<?php
$cs = Yii::app()->getClientScript();
$baseUrl = Yii::app()->theme->baseUrl;
$cs->registerScriptFile($baseUrl . '/js/highcharts.src.js');

Util::tsRegisterAssetJs("reports.js");
Util::tsRegisterAssetJs("exportHighcharts.js");
$cs->registerScriptFile("http://code.highcharts.com/modules/exporting.js");
//<script src="http://code.highcharts.com/modules/exporting.js"></script>
?>

<div class="row-fluid">
    <div class="span10 ">
        <?php
        $this->beginWidget('zii.widgets.CPortlet', array(
            'title' => Yii::t('AweCrud.app', 'Indicadores Infantiles')
        ));
        ?>
        <div class="row-fluid">
            <div class="span5 offset1">
                <?php
                echo CHtml::label('Institución:', 'institucion', array('class' => 'span3'));
                echo CHtml::dropDownList('institucion', 'empty', CHtml::listData($model, 'id', Institucion::representingColumn()), array('empty' => '-- Seleccione --'), array('class' => 'span3'));
                ?>
            </div>
            <div class="span5">
                <?php
                echo CHtml::label('Mes:', 'mes', array('class' => 'span2'));
                $this->widget('bootstrap.widgets.TbDatePicker', array(
                    'model' => $model,
                    'name' => 'fecha_mes',
                    'options' => array(
                        'autoclose' => true,
                        'format' => 'yyyy-mm',
                        'minViewMode' => 'months',
                        'ViewMode' => 'years',
                    ),
                    'htmlOptions' => array(
                        'readonly' => true,
                        'class' => 'input-large',
                    )
                ));
                    
                ?>
            </div>
        </div>
        <div class="row-fluid">
            <div class="offset5">
                <?php
                $this->widget('bootstrap.widgets.TbButton', array(
                    'type' => 'info',
                    'icon' => 'icon-th-list',
                    'label' => Yii::t('AweCrud.app', 'Ver datos'),
                    'htmlOptions' => array(
                        'onclick' => 'js:loadGrafica()',
                        ),
                ));
                ?>
            </div>
        </div>
        <div class="row-fluid" style="padding-top: 1%">
            <div class="well span6 " id="reporPieTalla" >
            </div>

            <div class="well span6" id="reporPiePeso" >
            </div>
        </div>
        <div class="row-fluid">
            <div class="pull-right">
                <?php
                $this->widget('bootstrap.widgets.TbButton', array(
                    'type' => 'success',
                    'icon' => 'print',
                    'label' => Yii::t('AweCrud.app', 'Imprimir  todas las curvas'),
                    'htmlOptions' => array('onclick' => 'js:printCharts([chartTalla,chartPeso])'),
                ));
                ?>
            </div>
        </div>
        <?php $this->endWidget(); ?>
    </div>
</div>